Method and apparatus for fault tolerant TCP handshaking

ABSTRACT

Method and apparatus for fault tolerant TCP handshaking that includes a first node and a second node both connected in a network where the second node is one of at least two nodes in a cluster of nodes. The second node receives a first message from the first node where the first message includes a sequence number. The second node generates a fingerprint and replaces a portion of the sequence number with the fingerprint to form a cryptographic sequence number. The cryptographic sequence number is sent from the second node to the first node. A second message that includes the cryptographic sequence number is received from the first node at the second node. Any node in the cluster can verify that the cryptographic sequence number sent by the first node was created by one of the nodes in the cluster thereby providing fault tolerant TCP handshaking.

[0001] This application claims the benefit of U.S. Provisional Patent Application No. 60/279,440, filed Mar. 29, 2001, the contents of which is incorporated by reference herein in its entirety.

BACKGROUND

[0002] 1. Field of the Invention

[0003] This invention relates to Transmission Control Protocol (TCP), and more specifically to fault tolerant TCP handshaking.

[0004] 2. Background Information

[0005] Many networks consist of a number of client machines and server machines interconnected through the network. Generally, clients make requests to servers for information across the network. The server responds by supplying the information to the client. Transmission control protocol (TCP) is a networking protocol that provides communication across interconnected networks between computing devices such as client machines and server machines. An initial exchange, known as handshaking, between a client and a server occurs prior to data transmission to ensure proper data transmission.

[0006] Moreover, a collection or group of network nodes interconnected together called a cluster may reside on the network. The cluster may process traffic between a client and server. Clustering increases the effectiveness and efficiency of security, administration and performance, and helps servers become fault resilient. All nodes in a cluster have external interfaces on one wire and their internal interfaces on another wire. The entire cluster behaves as if it were a single piece of hardware. Each cluster member listens on the external cluster address, therefore, seeing every packet addressed to the cluster.

[0007]FIG. 1 shows a block diagram of a network containing a first network node connected to a cluster of network nodes. Network node 10, i.e., client machine, may be connected to a cluster 20 via network 12. Cluster 20 may consist of two or more network nodes 22-28. Network nodes 22-28 have internal connections 14 as well as external connections 16 to the network 12. Cluster 20 may transfer traffic between a client network node 10 and a server node (not shown).

[0008] A cluster member may be operating in one of two states, a working resources state or a mirror state. If a member is handling a given TCP connection, the member may have various working resources allocated to it, e.g., sockets, memory buffers, etc. However, since any other member must be prepared to take over for that member at any given time, the other members must possess a mirrored state. A mirrored state is a passive state sufficient to recreate the working resources in order to handle the workload or TCP connection of another member. Only the minimal amount of state to allow other members to reproduce the original state upon fail over may be sent to each member in the cluster. Further, each individual member may not need to be configured with all state information. Once a member is configured as part of the cluster, state information and other configuration information may be propagated automatically.

[0009] In current systems, a problem occurs if the start of a TCP handshake is clustered. When this occurs, the entire cluster is made highly vulnerable to a SYN denial of service attack. This occurs when some attacker simply floods a targeted machine in a cluster with many bogus SYNs with source addresses that are randomly generated. If the fact that the targeted machine just received a SYN is clustered, too much memory is taken up for each individual SYN, and an attacker could cripple the cluster with a SYN flood.

[0010] During a typical TCP handshake, a client chooses a sequence number randomly and sends a SYN message with the sequence number to the destination (i.e., cluster). The cluster receives the SYN, picks a random sequence number and sends a SYN/ACK with this number back to the client. The client then acknowledges (ACKs) the cluster's sequence number.

[0011] However, a problem occurs if the node in the cluster handling the connection fails after it has sent the SYN/ACK. Then, a client may think that it has an open connection, but none of the members of the cluster know that this connection exists since this connection is starting and hasn't been clustered. The data during the cluster receipt of the SYN is not clustered as noted previously since an attacker could flood a cluster with random SYNs and cause the node in the cluster to exhaust all memory for bogus connections.

[0012] Therefore a need exists for methods and apparatus that handle situations when a node in a cluster fails during an initial TCP handshake.

SUMMARY OF THE INVENTION

[0013] The present invention is directed to a method for fault tolerant TCP handshaking that includes: receiving a first message from a first node in a network at a second node in the network, where the second node is one of two or more nodes in a cluster of nodes, and where the first message includes a sequence number; generating a fingerprint; replacing a portion of the sequence number with the fingerprint to form a cryptographic sequence number; sending the cryptographic sequence number from the second node to the first node; and receiving a second message from the first node at the second node, where the second message includes the cryptographic sequence number. Any node in the cluster can verify that the cryptographic sequence number sent by the first node was created by one of the nodes in the cluster thereby providing fault tolerant TCP handshaking.

[0014] The present invention is also directed to a system for fault tolerant TCP handshaking that includes a first node and a second node both operably connected to a network. The second node is one of two or more nodes in a cluster of nodes operatively connected to the network. The second node: receives a first message from the first node that includes a sequence number, generates a fingerprint, replaces a portion of the sequence number with the fingerprint to form a cryptographic sequence number, and sends the cryptographic sequence number from the second node to the first node. A second message including the cryptographic sequence number may be received at the second node from the first node. Any node in the cluster is capable of verifying that the cryptographic sequence number sent by the first node was created by one of the nodes in the cluster thereby providing fault tolerant TCP handshaking.

[0015] Moreover, the present invention is further directed to an apparatus comprising a storage medium with instructions stored therein. The instructions when executed cause a computing device to perform: receiving a first message from a node in a network, where the first message includes a sequence number; generating a fingerprint; replacing a portion of the sequence number with the fingerprint to form a cryptographic sequence number; sending the cryptographic sequence number to the node; and receiving a second message from the node, where the second message includes the cryptographic sequence number. The cryptographic sequence number may be verified as having been created by one of two or more nodes in a cluster thereby providing fault tolerant TCP handshaking.

BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The present invention is further described in the detailed description which follows in reference to the noted plurality of drawings by way of non-limiting examples of embodiments of the present invention in which like reference numerals represent similar parts throughout the several views of the drawings and wherein:

[0017]FIG. 1 is a block diagram of a network containing a first network node connected to a cluster of network nodes;

[0018]FIG. 2 is a block diagram of communication between a network node and a cluster according to an example embodiment of the present invention; and

[0019]FIG. 3 is a flowchart for fault tolerant TCP handshaking according to an example embodiment of the present invention.

DETAILED DESCRIPTION

[0020] The particulars shown herein are by way of example and for purposes of illustrative discussion of the embodiments of the present invention. The description taken with the drawings make it apparent to those skilled in the art how the present invention may be embodied in practice.

[0021] Further, arrangements may be shown in block diagram form in order to avoid obscuring the invention, and also in view of the fact that specifics with respect to implementation of such block diagram arrangements is highly dependent upon the platform within which the present invention is to be implemented, i.e., specifics should be well within purview of one skilled in the art. Where specific details (e.g., circuits, flowcharts) are set forth in order to describe example embodiments of the invention, it should be apparent to one skilled in the art that the invention can be practiced without these specific details. Finally, it should be apparent that any combination of hard-wired circuitry and software instructions can be used to implement embodiments of the present invention, i.e., the present invention is not limited to any specific combination of hardware circuitry and software instructions.

[0022] Although example embodiments of the present invention may be described using an example system block diagram in an example host unit environment, practice of the invention is not limited thereto, i.e., the invention may be able to be practiced with other types of systems, and in other types of environments.

[0023] Reference in the specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. The appearances of the phrase “in one embodiment” in various places in the specification are not necessarily all referring to the same embodiment.

[0024] The present invention relates to method and apparatus for fault tolerant TCP handshaking where fingerprinted TCP acknowledgments (ACKs) are used to solve the problem of node failure during an initial TCP handshake. With fingerprinted ACKs, a sequence number with a cryptographic fingerprint (cryptographic sequence number) is generated by a node in a cluster so that any member of the cluster may verify that a sequence number received and acknowledged by the cluster is one that a member in the cluster would have created.

[0025] A fingerprint may be a set of bits from a hash function of a source node's address, port, destination port, destination address, and a cluster wide shared secret. The hash function may be, for example, a 128 bit MD5 hash. The cluster wide shared secret may change periodically for added security, for example, every two minutes. Moreover, the result of the hash function may be mixed with some random bits to still keep some parts of the sequence number from the hash code in the generation of the fingerprint. In methods and apparatus according to the present invention, a fingerprint is added to a portion of or replaces the sequence number received from a source node (e.g., client machine).

[0026] As noted, a fingerprint may be a hash of the source IP address, source port, destination IP address, destination port, and current cluster secret. Bits 3-20 of this hash may then be used to replace bits 3-20 of a sequence number received from the source node. Bits 0-2 may be left unchanged to allow some randomness between TCP sequence numbers for a specific value of the cluster secret. The cluster secret may be a private key between all nodes in the cluster.

[0027] In methods and apparatus according to the present invention, if a cluster member receives a TCP ACK and fingerprinted acknowledgments is enabled, the TCP stack at the cluster node may check to see if that sequence number is correct. If so, then this cluster node uses that ACK to build an entire TCP connection and presumes that the connection is the source node's ACK with cryptographic sequence number of something a failed cluster node had started. Therefore, nodes in a cluster can verify that acknowledges received from clients contain a cryptographic sequence number that was created by a node at that cluster, thereby providing fault tolerant TCP handshaking where alien or hostile clients cannot bombard a cluster with bogus acknowledgments.

[0028]FIG. 2 shows a block diagram of communication between a network node and a cluster according to an example embodiment of the present invention. Network 10 communicates with network node 20 by initially sending a SYN message. A node in cluster 20 receives the SYN message from network node 10, generates a fingerprint and replaces the sequence number in the SYN message with a crypto sequence number and forwards this to network node 10. Network node 10 receives the crypto sequence number and inserts this in any acknowledgment sent from network node 10 to the cluster 20.

[0029]FIG. 3 shows a flowchart for fault tolerant TCP handshaking according to an example embodiment of the present invention. An SYN message with a sequence number is received from a first node at a second node S1. The second node is a member of a cluster of nodes. The second node generates a fingerprint by performing a hash function on a cluster secret, and address and port of the first and second nodes S2. A cryptographic sequence number is formulated at the second node by replacing a portion of the sequence number with the fingerprint S3. The cryptographic sequence number is sent from the second node to the first node S4. Any acknowledgments received at the nodes in the cluster are verified by determining if they have a cryptographic sequence number generated by one of the cluster nodes S5.

[0030] The present invention is advantageous in that an attacker may not simply flood a targeted machine with erroneous SYNs with source addresses that are randomly generated. Therefore, memory is not taken up due to the creation of connections from bogus acknowledgments.

[0031] It is noted that the foregoing examples have been provided merely for the purpose of explanation and are in no way to be construed as limiting of the present invention. While the present invention has been described with reference to a preferred embodiment, it is understood that the words that have been used herein are words of description and illustration, rather than words of limitation. Changes may be made within the purview of the appended claims, as presently stated and as amended, without departing from the scope and spirit of the present invention in its aspects. Although the present invention has been described herein with reference to particular methods, materials, and embodiments, the present invention is not intended to be limited to the particulars disclosed herein, rather, the present invention extends to all functionally equivalent structures, methods and uses, such as are within the scope of the appended claims. 

What is claimed is:
 1. A method for fault tolerant TCP handshaking comprising: receiving a first message from a first node in a network at a second node in the network, the second node being one of at least two nodes in a cluster of nodes, the first message including a sequence number; generating a fingerprint; replacing a portion of the sequence number with the fingerprint to form a cryptographic sequence number; sending the cryptographic sequence number from the second node to the first so node; and receiving a second message from the first node at the second node, the second message including the cryptographic sequence number, wherein any node in the cluster can verify that the cryptographic sequence number sent by the first node was created by one of the nodes in the cluster thereby providing fault tolerant TCP handshaking.
 2. The method according to claim 1, wherein the first message comprises a SYN message.
 3. The method according to claim 1, further comprising generating the fingerprint using an Internet Protocol (IP) address of the first node, a port of the first node, a port of the second node, an IP address of the second node, and a cluster secret.
 4. The method according to claim 3, further comprising generating the fingerprint by performing a hash function on the IP address of the first node, the port of the first node, the port of the second node, the IP address of the second node, and the cluster secret.
 5. The method according to claim 3, wherein the cluster secret comprises a private key of the nodes in the cluster.
 6. The method according to claim 4, wherein the hash function comprises an MD5 hash.
 7. The method according to claim 1, wherein the second message comprises an acknowledge message.
 8. The method according to claim 3, further comprising changing the cluster secret at periodic intervals.
 9. The method according to claim 8, further comprising changing the cluster secret every two minutes.
 10. The method according to claim 4, further comprising generating the fingerprint using the result from the hash function mixed with some random bits.
 11. A system for fault tolerant TCP handshaking comprising: a first node, the first node operably connected to a network; and a second node, the second node being one of at least two nodes in a cluster of nodes operably connected to the network, the second node: receiving a first message that includes a sequence number from the first node, generating a fingerprint, replacing a portion of the sequence number with the fingerprint to form a cryptographic sequence number, and sending the cryptographic sequence number from the second node to the first node, wherein a second message including the cryptographic sequence number may be received from the first node at the second node, any node in the cluster capable of verifying that the cryptographic sequence number sent by the first node was created by one of the nodes in the cluster thereby providing fault tolerant TCP handshaking.
 12. The system according to claim 11, wherein the second node generates the fingerprint using an Internet Protocol (IP) address of the first node, a port of the first node, a port of the second node, an IP address of the second node, and a cluster secret.
 13. The system according to claim 12, wherein the second node generates the fingerprint by performing a hash function on the IP address of the first node, the port of the first node, the port of the second node, the IP address of the second node, and the cluster secret.
 14. The system according to claim 12, wherein the cluster secret comprises a private key of the nodes in the cluster.
 15. The system according to claim 11, wherein the first message comprises a SYN message.
 16. The system according to claim 11, wherein the second message comprises an Acknowledge message.
 17. An apparatus comprising a storage medium with instructions stored therein, the instructions when executed causing a computing device to perform: receiving a first message from a node in a network, the first message including a sequence number; generating a fingerprint; replacing a portion of the sequence number with the fingerprint to form a cryptographic sequence number; sending the cryptographic sequence number to the node; and receiving a second message from the node, the second message including the cryptographic sequence number, wherein the cryptographic sequence number may be verified as having been created by one of at least two nodes in a cluster thereby providing fault tolerant TCP handshaking.
 18. The apparatus according to claim 17, wherein the fingerprint is generated using an Internet Protocol (IP) address of the first node, a port of the first node, a port of the second node, an IP address of the second node, and a cluster secret.
 19. The apparatus according to claim 18, wherein the fingerprint is generated by performing a hash function on the IP address of the first node, the port of the first node, the port of the second node, the IP address of the second node, and the cluster secret.
 20. The apparatus according to claim 18, wherein the cluster secret comprises a private key of the nodes in the cluster.
 21. The apparatus according to claim 17, wherein the first message comprises a SYN message.
 22. The apparatus according to claim 17, wherein the second message comprises an Acknowledge message. 